Null pointer dereference (NPD) is a common defect that causes software failures and is not easy to be detected. Statically detecting NPD errors requires very precise data flow analysis to track the information flow, especially that flows into and out from heap.
Program analysis is a prerequisite for program transformations performed by compilers. In short, a compiler is a program dial translates one language (usually a higher level language) into another language (usually a lower level language). A high level language may be easy for people to use in programming, reading, communicating and maintaining. A low level language may be directly interpreted and run by computers. A classical program representation for program analysis is called control flow graph (CFG). CFG based analysis and transformation suffers from two disadvantages. One is that CFG lacks of value information, and the other is that CFG is not a sparse type, and thus it may be slower to detect defects using CFG due to its sense structure.
To solve the above problems, a data structure called value dependence graph (VDG) was proposed. The VDG is a sparse dataflow-like representation and it is a functional representation that represents control flow as data flow and makes explicit all machine quantities, such as stores and I/O channels. Daniel Weise et al. proposed a compiler in 1994, which builds a VDG representing a program, analyzes and transforms the VDG and then produces a control flow graph (CFG) from the optimized VDG. This frame work simplifies transformations when compared with the prior art.